import store from "@/store";

export const formItemStyle = {
  paddingLeft: "20px",
};

export const cellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表头单元格样式
export const headerCellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表格内表单子样式
export const tableFormStyle = {
  marginBottom: 0,
};

export const formBase = [
  {
    label: "时效",
    type: "select",
    required: true,
    field: "timeEfficiencyId",
    optionsKey: "name",
    optionsValue: "id",
    options: store.state.custom_dict.timely,
  },
  {
    label: "目的地",
    type: "select",
    required: true,
    field: "destinationId",
    optionsKey: "destinationName",
    optionsValue: "destinationId",
    options: store.state.custom_dict.destination,
  },
  {
    label: "承运商",
    type: "select",
    required: true,
    field: "carrierId",
    optionsKey: "carrierName",
    optionsValue: "id",
    options: store.state.custom_dict.carrier,
  },
  {
    label: "店铺",
    type: "select",
    field: "shopId",
    optionsKey: "shopName",
    optionsValue: "id",
    options: store.state.custom_dict.shop,
  },

  {
    label: "是否有效",
    type: "select",
    field: "status",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      {
        label: "是",
        value: 1,
      },
      {
        label: "否",
        value: 0,
      },
    ],
  },
];
export const tableBase = [
  {
    label: "时效",
    prop: "timely",
    width: 150,
    operate: {
      type: "select",
      field: "timeEfficiencyId",
      optionsKey: "name",
      optionsValue: "id",
      options: store.state.custom_dict.timely,
    },
  },
  {
    label: "店铺",
    prop: "shopName",
    width: 150,
    operate: {
      type: "select",
      field: "shopId",
      optionsKey: "shopName",
      optionsValue: "id",
      options: store.state.custom_dict.shop,
    },
  },
  {
    label: "目的地",
    prop: "destinationName",
    width: 150,
    operate: {
      type: "select",
      field: "destinationId",
      optionsKey: "destinationName",
      optionsValue: "destinationId",
      options: store.state.custom_dict.destination,
    },
  },
  {
    label: "仓库",
    prop: "warehouseName",
    width: 150,
    operate: {
      type: "select",
      field: "warehouseId",
      optionsKey: "warehouseName",
      optionsValue: "id",
      options: store.state.custom_dict.warehouse,
    },
  },
  {
    label: "承运商",
    prop: "carrierName",
    width: 150,
    operate: {
      type: "select",
      field: "carrierId",
      optionsKey: "carrierName",
      optionsValue: "id",
      options: store.state.custom_dict.carrier,
    },
  },
  {
    label: "是否有效",
    prop: "status",
    slotName: "status",
  },
  {
    label: "创建人",
    prop: "createBy",
    otherOptions: {},
  },
  {
    label: "创建时间",
    prop: "createTime",
    otherOptions: {},
    width: 150,
  },
  {
    label: "修改时间",
    prop: "updateTime",
    otherOptions: {},
    width: 150,
  },
  {
    label: "修改人",
    prop: "updateBy",
    otherOptions: {},
    width: 150,
  },
];
